<script src="${ctx}/static/js/BJUI/plugins/print/webtoolkit.md5.js" type="text/javascript"></script>
<script type="text/javascript">
function passsubmit(){
	if ($("#oldpass").val() != MD5($("#oldpassword").val())){
		$("#j_pwschange_form").alertmsg('error', '原始密码错误!');
		return false;
	}
	
	if ($("#newpassword").val() != $("#secpassword").val()){
		$("#j_pwschange_form").alertmsg('error', '确认密码失败!');
		return false;
	}
	$("#j_pwschange_form").submit();
}
</script>
<div class="bjui-pageContent tableContent">
	<form id="j_pwschange_form" action="${ctx}/user/changpwd" data-toggle="validate" method="post">
		<input type="hidden" name="id" value="${session.user.id}">
		<input type="hidden" id="username" value="${session.user.username}">
		<input type="hidden" id="oldpass"  value="${session.user.password}">
		<div class="pageFormContent" data-layout-h="0">
            <hr>
            <div class="form-group">
                <label for="j_pwschange_oldpassword" class="control-label x85">旧密码：</label>
                <input type="text" data-rule="required" name="" id="oldpassword" value="" placeholder="旧密码" size="20">
            </div>
            <div class="form-group" style="margin: 20px 0 20px; ">
                <label for="j_pwschange_newpassword" class="control-label x85">新密码：</label>
                <input type="password" data-rule="新密码:required" name="newpassword" id="newpassword" value="" placeholder="新密码" size="20">
            </div>
            <div class="form-group">
                <label for="j_pwschange_secpassword" class="control-label x85">确认密码：</label>
                <input type="password" data-rule="确认密码:required" name="" id="secpassword" value="" placeholder="确认新密码" size="20">
            </div>
		</div>
		<div class="bjui-pageFooter">
            <ul>
                <li><button type="button" class="btn-close">取消</button></li>
                <li><button type="button" onclick="javascript:passsubmit();" class="btn-default">保存</button></li>
            </ul>
		</div>
	</form>
</div>

